<?php echo $this->render('/public/header'); ?>
<?php use yii\helpers\Url; ?>
    <div id="main" class="col-xs-12">
        <div class="col-xs-4">
            <div class="layui-box layui-upload-button">
                <form target="layui-upload-iframe" method="post" key="set-mine" enctype="multipart/form-data" action="">
                    <input lay-title="批量上传" type="file" name="file" lay-type="file" class="layui-upload-file"></form>
                <span class="layui-upload-icon"><i class="layui-icon"></i>批量上传</span></div>
            <a href="javascript:window.history.go(-1);" class="layui-btn layui-btn-normal">返回</a>
            <br/>
            <br/>
            <form action="<?php echo Url::to(['setting/inquiry_act_add']); ?>" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">来源</label>
                    <div class="layui-input-block">
                        <select name="refer" class="form-control">
                            <?php foreach ($this->params['inquiryType'] as $v): ?>
                                <option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">是否新客户</label>
                    <div class="layui-input-block">
                        <select class="form-control" name="inquiry_status">
                            <option value="1">新客户</option>
                            <option value="2">旧客户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">发询盘时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="consultation_time" id="phone"
                               onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                               required autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">回复时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="reply_time" id="email"
                               onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">客户名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" required lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">国家</label>
                    <div class="layui-input-block">
                        <input type="text" name="country" required lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">邮箱</label>
                    <div class="layui-input-block">
                        <input type="text" name="email" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">客户来源</label>
                    <div class="layui-input-block">
                        <select class="form-control" name="recommend">
                            <?php foreach ($this->params['customerRefer'] as $v):?>
                                <option value="<?php echo $v['id'];?>"><?php echo $v['name'];?></option>
                            <?php endforeach;?>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">询盘内容</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入内容" name="inquiry_detail" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:100px">询盘质量</label>
                    <div class="layui-input-block">
                        <select class="form-control" name="star">
                            <option value="1">1星</option>
                            <option value="2">2星</option>
                            <option value="3">3星</option>
                            <option value="4">4星</option>
                            <option value="5">5星</option>
                        </select>
                    </div>
                </div>
                <!-- <div class="layui-form-item">
				<label class="layui-form-label" style="width:100px">业务员</label>
				<div class="layui-input-block">
					<select class="form-control" name="service_name">
						<?php if ($this->params['saleman']) { ?>
						<?php foreach ($this->params['saleman'] as $k => $v) { ?>
						<option value="<?php echo $v['job_number']; ?>"><?php echo $v['name']; ?></option>
						<?php } ?>
						<?php } ?>
					</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label" style="width:100px">联系时间</label>
				<div class="layui-input-block">
					<input type="text" name="link_time" required onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" autocomplete="off"  class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label" style="width:100px">状态</label>
				<div class="layui-input-block">
					<select class="form-control" name="status">
						<option value="1">已分配</option>
						<option value="2">待分配</option>
						<option value="3">拒绝</option>
					</select>
				</div>
			</div> -->

                <button type="submit" class="btn btn-success">添加</button>
        </div>
        </form>
    </div>
    <script>
        layui.upload({
            url: '<?php echo Url::to(['setting/inquiry_upload_excel']);?>'
            , success: function (res) {
                layer.alert(res.msg);
            }
        });
    </script>
<?php echo $this->render('/public/footer'); ?>